<%--
  Created by IntelliJ IDEA.
  User: 东方九夜
  Date: 2021/6/12
  Time: 13:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
		 pageEncoding="utf-8"%>
<%@ page import="bean.*" %>
<%@ page import="dao.*" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8" />
	<title>学生界面</title>
	<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
	<link type="text/css" rel="stylesheet" href="css/index.css">
<body>
<%
	Customer c = (Customer) request.getSession().getAttribute("student");
	if(c == null){
		response.sendRedirect("Not_Login.jsp");
	}
%>
<div class="main">
	<div class="navigation">
				<span>欢迎回来!
					<%
						if(c != null){
							out.print(c.getName());
						}
					%>
					同学
				</span>
		<a class="exit" href="index.jsp"><span>退出登录</span></a>
	</div>
	<table class="table" style="margin:0 auto;width:90%">
		<tr>
			<td style="width:20%"><button class= "btn btn-info" style="width:100%" onclick="window.location.href='index_Student.jsp'">公告</button>	</td>
			<td style="width:20%"><button class= "btn btn-info" style="width:100%" onclick="window.location.href='UploadPaper.jsp'">论文上传</button></td>
			<td style="width:20%"><button class= "btn btn-info" style="width:100%" onclick="window.location.href='MyGrade.jsp'">成绩查询</button></td>
		</tr>
	</table>
	<div>
		<%
//			String ID = request.getParameter("ID");
			assert c != null;
			Score score = StudentSql.selectGrade(c.getId());
		%>
		<table class="table table-hover; table_center"  style="margin:0 auto;width: 90%;color: white;font-weight: bolder">
			<tr>
				<th>名字</th>
				<th>题目</th>
				<th>评分教师</th>
				<th>评分</th>
				<th>级别</th>
			</tr>
			<%
				if (score!=null){
			%>
			<tr>
				<td><%=score.getName() %></td>
				<td><%=score.getTitle() %></td>
				<td><%=score.getT_Name() %></td>
				<td><%=score.getSocre() %></td>
				<td><%=score.getGrade() %></td>
			</tr>
			<%
				}
			%>
		</table>
	</div>
</div>

</body>
</html>
